<script>
import { getBannerList } from '@/api/banner'
export default {
  name: 'bannerlist',
  data () {
    return {
      bannerList: []
    }
  },
  mounted () {
    getBannerList().then(res => {
      // console.log(res);
      this.bannerList = res.data
    })
  }
}
</script>
<template>
  <div>
    轮播图列表

    <el-table :data="bannerList">
      <el-table-column type="index" label="序号"></el-table-column>
      <el-table-column prop="img" label="图片">
        <template #default="scope">

          <el-image :src="scope.row.img" />
        </template>
      </el-table-column>
      <el-table-column prop="alt" label="提示信息"></el-table-column>
      <el-table-column prop="link" label="链接"></el-table-column>
    </el-table>


  </div>
</template>
<style scoped lang="scss">
.el-image {
  width: 80px;
}
</style>
